package com.chenzhou.common;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DBuitl {

    private static String driver = "com.mysql.jdbc.Driver";
    private static String url = "jdbc:mysql://localhost:3306/db_goods?characterEncoding=utf-8";
    private static String username = "root";
    private static String password = "123456";

    public static Connection get_Connection(){
        try {
            Class.forName(driver);
            return DriverManager.getConnection(url,username,password);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return null;
    }
}
